package com.haidechizi.leetcode;

public class _16_交点 {

    public double[] intersection(int[] start1, int[] end1, int[] start2, int[] end2) {

        double[] result = new double[2];
        foo:for (int i = 0; i < start1.length; i++) {
            for (int j = 0; j < start2.length; j++) {
                if (start1[i] == start2[j] && end1[i] == end2[j]) {
                    result[0] = start1[i];
                    result[1] = end1[i];
                    break foo;
                }
            }
        }
        return result;

    }
}
